﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yun.Interface;
using Yun.Marketing.Response;
using Yun.Util;

namespace Yun.Marketing.Request
{
    /// <summary>
    /// 获取红包信息
    /// yun.game.redpacket.get
    /// </summary>
    public class GetRedEnvelopeInfoRequest : ITopRequest<GetRedEnvelopeInfoResponse>
    {
        /// <summary>
        /// 红包ID
        /// </summary>
        public int Id { get; set; }

        public string GetApiName()
        {
            return "yun.game.redpacket.get";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"id", Id}
            };
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateMinValue("id", Id,1 );
        }
    }
}
